<html>
<body>
<!--   -->
<!-- In PHP, there are three kind of arrays:

Numeric array - An array with a numeric index
Associative array - An array where each ID key is associated with a value
Multidimensional array - An array containing one or more arrays  -->
<!-- Numeric Arrays

A numeric array stores each array element with a numeric index.  -->
<?php
$cars[0]="Saab";
$cars[1]="Volvo";
$cars[2]="BMW";
$cars[3]="Toyota"; 
echo $cars[0] . " and " . $cars[1] . " are Swedish cars.";
?>



<!-- Associative Arrays

An associative array, each ID key is associated with a value.  -->
<?php
$ages['Peter'] = "32";
$ages['Quagmire'] = "30";
$ages['Joe'] = "34";

echo "Peter is " . $ages['Peter'] . " years old.";
?>



<!-- Multidimensional Arrays

In a multidimensional array, each element in the main array can also be an array. And each element in the sub-array can be an array, and so on.  -->
<?php
$families = array
  (
  "Griffin"=>array
  (
  "Peter",
  "Lois",
  "Megan"
  ),
  "Quagmire"=>array
  (
  "Glenn"
  ),
  "Brown"=>array
  (
  "Cleveland",
  "Loretta",
  "Junior"
  )
  );
  
  echo "Is " . $families['Griffin'][2] . 
" a part of the Griffin family?";
  ?>
</body>
</html>